// Model
#pragma once
#include "glotech_headers.h"

typedef struct node NODE;
typedef struct queue QUEUE;

struct model {
	QUEUE * q_expert;
	QUEUE * q_technician;
};

typedef struct model MODEL;

QUEUE * init_queue(void);
int push(QUEUE * q, float pos_x, float pos_y, float pos_z, float theta_x, float theta_y, float theta_z,float time);
NODE * pop(QUEUE * q);
int is_queue_empty(QUEUE * q);
int difference(NODE *n, NODE * n1);
void destroy_queue(QUEUE * q);
void print_node(NODE *n );
void print_queue(QUEUE * q);
MODEL * init_model(void);
void destroy_model(MODEL * m);
void calculate_radius(QUEUE * q);
void calculate_radius_node(NODE * n);
NODE * model_get_data();
int init_driver_csv(const char * filename);
QUEUE * load_csv(const char * filename);

/* NODE functions */

float get_pos_x(NODE * n);
float get_pos_y(NODE * n);
float get_pos_z(NODE * n);
float get_theta_x(NODE * n);
float get_theta_y(NODE * n);
float get_theta_z(NODE * n);
float get_time(NODE * n);